home *** CD-ROM | disk | FTP | other *** search
- Path: mcdaniel.dallas.tx.us!not-for-mail
- From: tmcd@crl.com (Timothy A. McDaniel)
- Newsgroups: comp.std.c
- Subject: Re: Initializing a variable in terms of itself
- Date: 6 Apr 1996 16:18:46 GMT
- Organization: Tim McDaniel's home IBM-PC clone running Linux
- Message-ID: <4k65h6$dfe@nntp.crl.com>
- References: <4jpj9l$ik9@cnn.Princeton.EDU> <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>
- Reply-To: tmcd@crl.com
- NNTP-Posting-Host: crl11.crl.com
- X-Newsreader: perl5newspkg
-
- In article <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>,
- James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
- >In article <4jpj9l$ik9@cnn.Princeton.EDU> tim@franck (Tim Hollebeek)
- >writes:
- ...
- >|> int x = x;
- ...
- >The reference to `x' in the initialization expression is not, per se,
- >illegal. The variable is declared, and available for use, as soon as
- >the compiler sees the `=' sign.
-
- So
- void *x = &x;
- would be legal, then, and x would point to itself? (Or would it have
- to be
- void *x = (void *) &x;
- ?)
-
- --
- Tim McDaniel
- Reply-To: tmcd@crl.com
- Work account is mcdaniel@cpm.com
- Never use mcdaniel@mcdaniel.dallas.tx.us.
-